package com.project.controller.web;

import com.project.common.utils.ExcelUtil;
import com.project.myBeans.R;
import com.project.service.base.BaseService;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.util.ClassUtils;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@EnableAutoConfiguration //自动载入应用程序所需的所有Bean
@RestController //@Controller与@ResponseBody的合并
@RequestMapping(value = "/test")
public class TestController extends BaseService{

    /**
     *
     * @param file
     * @param request
     * @return
     */
    @ApiOperation("批量添加用户")
    @PostMapping(value = "/addBatch")
    public R addBatch( HttpServletRequest request){
        System.out.println("123456");
        try{
            System.out.println("进入读取文件");
//            ExcelUtil.parse(file);
            return R.ok();
        }catch(Exception e){
            e.printStackTrace();
            return R.error();
        }
    }

}
